﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DBBase;
namespace Business
{
    public partial class department : Form
    {
        public department()
        {
            InitializeComponent();
            getdate();
        }

        public void getdate()
        {
            list.Rows.Clear();
            Query objquery = new Query();
            string ssqlex = "";
            ssqlex = string.Format(@"select * from jyjgxxxz18c01  order by jyjgxxxz_ID");
            DataTable dt = objquery.GetTable(ssqlex);
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                this.list.Rows.Add();
                this.list.Rows[i].Cells[0].Value = string.Format("{0}", i + 1);
                this.list.Rows[i].Cells[1].Value = string.Format("{0}", dt.Rows[i]["XZ_1"].ToString().Trim());
                this.list.Rows[i].Cells[2].Value = dt.Rows[i]["XZ_2"].ToString().Trim();
                this.list.Rows[i].Cells[3].Value = dt.Rows[i]["XZ_9"].ToString().Trim();
                this.list.Rows[i].Cells[4].Value = dt.Rows[i]["XZ_10"].ToString().Trim();
                this.list.Rows[i].Cells[5].Value = dt.Rows[i]["XZ_11"].ToString().Trim();
                this.list.Rows[i].Cells[6].Value = dt.Rows[i]["XZ_12"].ToString().Trim();
                this.list.Rows[i].Cells[7].Value = dt.Rows[i]["XZ_13"].ToString().Trim();
                this.list.Rows[i].Cells[8].Value = dt.Rows[i]["XZ_14"].ToString().Trim();
            }
        }
    }
}
